<?php
/* 
    Project     : 48c6c450f1a4a0cc53d9585dc0fee742
    Created on  : Mar 16, 2013, 11:29:15 PM
    Author      : Truong Khuong - khuongxuantruong@gmail.com
    Description :
        Purpose of the stylesheet follows.
*/
class batchu_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    function get_by_id($id=0){
		$query=$this->db
                ->where('Id',$id)
				->limit(1)
                ->get('batchu');
        return $query->row();
	}
    function get_by_stt($stt=0){
		$query=$this->db
                ->where('Id >',$stt)
				->limit(1)
                ->get('batchu');
        return $query->row();
	}
	function adduser($uparams,$iparams){
		$this->db->on_duplicate_update('batchuuser', $iparams,$uparams); 
	}
	function get_user_by_id($id=''){
		$query=$this->db
                ->where('Id',$id)
				->limit(1)
                ->get('batchuuser');
        return $query->row();
	}
}
